public class text3_3 {
    public static void main (String args[]) {
       double sum =0,item=1;
       int i=1,n=20;
       do{
        sum=sum+item;
        i=i+1;
        item = item*(1.0/i);
       }while(i<n);
       System.out.println("sum="+sum);
    }
}
